﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <ul id="submenu">
        <li><%= Html.ActionLink(Html.Translate("Controls"), "Controls", "Admin", null, new { id = "controls" })%></li>
        <li><%= Html.ActionLink(Html.Translate("Settings"), "Settings", "Admin", null, new { id = "settings" })%></li>
    </ul>
    
    <h2><%= Html.Translate("Controls") %></h2>
    <form id="fields" action="<%=Url.Action("Settings","Admin")%>" method="post">
    <table cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td>
                <div class="postfields">
                    <div class="settings">
                      <h1><%=Resources.labels.recentPosts %></h1>
                      <label for="NumberOfRecentPosts"><%=Resources.labels.numberOfPosts %></label>
                      <%= Html.TextBox("NumberOfRecentPosts", BlogSettings.Instance.NumberOfRecentPosts.ToString(), new { width = 30 })%><br />
                      
                      <label for="DisplayCommentsOnRecentPosts"><%=Resources.labels.displayCommentsOnRecentPosts %></label>
                      <%= Html.CheckBox("DisplayCommentsOnRecentPosts", BlogSettings.Instance.DisplayCommentsOnRecentPosts)%><br />
                      
                      <label for="DisplayRatingsOnRecentPosts"><%=Resources.labels.displayRatingsOnRecentPosts %></label>
                      <%= Html.CheckBox("DisplayRatingsOnRecentPosts", BlogSettings.Instance.DisplayRatingsOnRecentPosts)%>

                    </div>

                    <div class="settings">

                      <h1><%=Resources.labels.recentComments %></h1>
                      <label for="NumberOfRecentComments"><%=Resources.labels.numberOfComments %></label>
                      <%= Html.TextBox("NumberOfRecentComments", BlogSettings.Instance.NumberOfRecentComments.ToString())%><br />

                    </div>

                    <div class="settings">

                      <h1><%=Resources.labels.searchField %></h1>
                      <label for="SearchButtonText"><%=Resources.labels.buttonText %></label>
                      <%= Html.TextBox("SearchButtonText",BlogSettings.Instance.SearchButtonText) %><br />
                      
                      <label for="SearchDefaultText"><%=Resources.labels.searchFieldText %></label>
                      <%= Html.TextBox("SearchDefaultText", BlogSettings.Instance.SearchDefaultText)%> <%=Resources.labels.defaultTextShownInSearchField %>
                      <br />
                      
                      <label for="EnableCommentSearch"><%=Resources.labels.enableCommentSearch %></label>
                      <%= Html.CheckBox("EnableCommentSearch", BlogSettings.Instance.EnableCommentSearch)%><br />
                      
                      <label for="SearchCommentLabelText"><%=Resources.labels.commentLabelText %></label>
                      <%= Html.TextBox("SearchCommentLabelText", BlogSettings.Instance.SearchCommentLabelText)%>
                      <br />

                    </div>

                    <div class="settings">

                      <h1><%=Resources.labels.contactForm %></h1>
                      <label for="ContactFormMessage"><%=Resources.labels.formMessage %></label>
                      <%= Html.TextArea("ContactFormMessage", BlogSettings.Instance.ContactFormMessage, new { rows = 5, cols = 40 })%>
                      <br />
                      
                      <label for="ContactThankMessage"><%=Resources.labels.thankYouMessage %></label>
                      <%= Html.TextArea("ContactThankMessage", BlogSettings.Instance.ContactThankMessage, new { rows = 5, cols = 40 })%>
                      <br />
                      
                      <label for="EnableContactAttachments"><%=Resources.labels.enableAttachments %></label>
                      <%= Html.CheckBox("EnableContactAttachments", BlogSettings.Instance.EnableContactAttachments)%>
                      
                    </div>
                </div>
            </td>
            <td id="tdsubmitbox" valign="top">
                <div id="submitbox">
                    <div class="buttons">
                        <button type="submit" class="positive">
                            <img src="../../Content/icons/tick.png" alt="" />保存
                        </button>
                    </div>
                </div>
            </td>
        </tr>
    </table>
    </form>
    <script type="text/javascript" language="javascript">
        SetCurrentTag("setting");
        SetCurrentTag("controls");
    </script>
</asp:Content>
